package com.lg.utils.hutool.cron_util;

import lombok.SneakyThrows;

import java.util.Random;
import java.util.concurrent.TimeUnit;

public  class TaskTask extends Thread{

    String name;
    public TaskTask(String name){
        this.name = name;

    }
    @SneakyThrows
    @Override
    public void run() {
        System.out.println(Thread.currentThread().getName()+" "+name+" start run");

        TimeUnit.SECONDS.sleep(new Random(10).nextInt(3)+1);

        System.out.println(Thread.currentThread().getName()+" "+name+" end run");
    }
}